//
//  PageLoadOperation.m
//  MoneyLog
//
//  Created by Max on 11-5-2.
//  Copyright 2011年 wicresoft. All rights reserved.
//

#import "PageLoadOperation.h"
#import "MoneyLogAppDelegate.h"

@implementation PageLoadOperation

@synthesize targetURL;

- (id)initWithURL:(NSURL*)url;{
    if (![super init]) return nil;
    [self setTargetURL:url];
    return self;}- (void)dealloc {
        [targetURL release], targetURL = nil;
        [super dealloc];
}

- (void)main 
{
    /*
    NSString *webpageString = [[[NSString alloc]
                                initWithContentsOfURL:[self targetURL]] autorelease];
    NSError *error = nil;
    NSXMLDocument *document = [[NSXMLDocument alloc]
                               initWithXMLString:webpageString 
                               options:NSXMLDocumentTidyHTML error:&error];
    if (!document) {
        NSLog(@"%s Error loading document (%@): %@", 
              _cmd, [[self targetURL] absoluteString], error);
        return;
    }
    
    [[MoneyLogAppDelegate shared] performSelectorOnMainThread:@selector(pageLoaded:) withObject:document waitUntilDone:YES];
    [document release];
    */
}
@end
